package com.ruoyi.shop.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.shop.api.domain.PetrolImage;
import com.ruoyi.shop.api.factory.RemoteOilFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteImageService", value = ServiceNameConstants.SHOP_SERVICE,fallbackFactory = RemoteOilFallbackFactory.class)

public interface RemoteImageService {

    @GetMapping(value = "/aa/{id}")
    public PetrolImage getInfo1(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    @GetMapping(value = "/image1/bb/{id}")
    public PetrolImage selectPetrolImageByPetrolId(@PathVariable("id") Long id,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
